#include "Conversion.h"

#define SCALE 0.03f

b2Vec2 sfmlToBox2dPosition(sf::Vector2f sf_position) {
	b2Vec2 b2d_position;

	b2d_position.x = sf_position.x * SCALE;
	b2d_position.y = (WINDOW_HEIGHT - sf_position.y) * SCALE;

	return b2d_position;
}


sf::Vector2f box2dToSfmlPosition(b2Vec2 b2d_position) {
	return sf::Vector2f(b2d_position.x / SCALE, WINDOW_HEIGHT - (b2d_position.y / SCALE));
}

float sfmlToBox2dLength(float sf_length) {
	return sf_length * SCALE;
}

float box2dToSfmlLength(float b2d_length) {
	return b2d_length / SCALE;
}